package com.example.demofile.utils;

import java.util.UUID;

/**
 * @author simon . guo
 * @version 1.0
 * @className StringUtil
 * @date 2022-01-06 上午 09:02
 * @description : demo
 */
public class StringUtil {

    public static String uuid() {
        UUID uuid = UUID.randomUUID();
        return uuid.toString().replace("-", "");
    }

    /**
     * * 判断一个对象是否为空
     *
     * @param object Object
     * @return true：为空 false：非空
     */
    public static boolean isNull(Object object)
    {
        return object == null;
    }

    /**
     * * 判断一个对象是否非空
     *
     * @param object Object
     * @return true：非空 false：空
     */
    public static boolean isNotNull(Object object)
    {
        return !isNull(object);
    }

    public static void main(String[] args) {
        System.out.println(uuid());
    }

}
